package com.github.soiff.shadow.plugin.helper;

import com.github.jknack.handlebars.Helper;
import com.github.jknack.handlebars.Options;
import com.github.soiff.shadow.plugin.utils.JsonMapper;

import java.io.IOException;

/**
 * Created by Soiff on 2016/05/20.
 *
 * @author : Soiff
 */
public class JsonHelper implements Helper {
    @Override
    public CharSequence apply(Object context, Options options) throws IOException {
        return JsonMapper.nonEmptyMapper().toJson(context);
    }
}
